ext/session: code cleanup and minor refactoring#21467
Conversation
|
CI is failling but I'm in favour of those consistency fixes. I was recently again looking at setting up clang format and clang tidy on an individual extension basis. |
My bad, I redid the changes from a local branch and did not test it. I'll fix it right away! |
9d133e0 to
355d08a
Compare
|
@Girgias CI is green, please let me know if you manage to review it, in particular the changes to OnUpdateSidBits and OnUpdateSessionGcProbability. I find the strategy to return early on failure and leave the success case for last to be much more readable, if you are in favor I have more like that to submit. Also how do you stand on the space after cast? |
| php_session_remove_cookie(); /* remove already sent session ID cookie */ | ||
| /* 'replace' must be 0 here, else a previous Set-Cookie | ||
| header, probably sent with setcookie() will be replaced! */ | ||
| /* 'replace' must be 0 here, else a previous Set-Cookie |
There was a problem hiding this comment.
Maybe fix the 0 to false either in the future?
Agreed
I'm not sure if I have that much of a preference, I wonder what the majority of other extensions do and maybe try to converge to that? It would be nice to properly have some consistent styles across the codebase in the long run. |
No description provided.